package card_game;

import java.util.List;
import java.util.ArrayList;

public class Hand<T extends Card> {
    protected List<T> cards = new ArrayList<T>();
    
    public int score() {
	int score = 0;
	for (T card : cards)
	    score += card.value();

	return score;
    }

    public void addCard(T card) {
	cards.add(card);
    }
    
    public void clearHand() {
    	cards.clear();
    }

    public void print() {
	for (Card card : cards)
	    card.print();
    }
}